finding unread posts on the boards?

Category: Zone BBS Q&A

Post 1 by blbobby (Ooo you're gona like this!) on Saturday, 06-Jan-2007 21:02:21

This is a question to the admins, or whoever coded the feature that takes us directly to unread posts in a topic on the boards.

The question is: how did you do that? I think that is so neat, and I have pondered how such a thing could be done, but can't come up with a solution.

Anyway, thanks for a good feature, and I hope you will tell me how you did it, as I am totally clueless.

Bob

Post 2 by Chris N (I just keep on posting!) on Monday, 08-Jan-2007 10:27:15

We assume that, if you have loaded a page, you have read all posts on that page. We make note of the last post on the page and treat that as the latest post you have read. When you next load a topic, we check to see if you've read any posts in that topic. If you have something set as the latest post, and their are posts after that, they are unread. If the post noted as the latest read is the latest in the topic, you've read all the posts. If a post isn't found, you either haven't read any posts in the topic or you haven't read any posts since the feature was implemented a few weeks ago. The data we store is your user ID, the ID of the topic, and the ID of the latest-read message.

Post 3 by changedheart421 (I've now got the bronze prolific poster award! now going for the silver award!) on Monday, 08-Jan-2007 10:32:03

gosh what a breath. lol.

Post 4 by blbobby (Ooo you're gona like this!) on Monday, 08-Jan-2007 14:44:50

Boy, that's gona take some analysis for my slow mind, but thanks.

I do think it's a nice feature.

Bob

Post 5 by TylerK (This site is so "educational") on Sunday, 18-Feb-2007 19:09:02

If the database finds that there are unread posts in the topic, a <h3> Unread Posts </h3> is inserted before the first unread post.